#ifndef _PID_CTRL_H
#define _PID_CTRL_H

#include "my_sys.h"

typedef struct 
{
    float kp;
    float kd;
    float ki;

    float tar;
    float pre;
    float bias;
    float last_bias;
    float sum_bias;

    float out;
    float out_max;
}PID_t;

void InitTMP_PID(float kp, float ki, float kd);
void SetPID_Target(float tar, float out_max);
float PID_Ctrl(float pre, uint16_t TimeTick);

#endif


